/**
 * 卖会员业务查询
 * 暴露查询接口
 */

const { request } = require("./request");
const { requestUrl } = require("../configs/sellingMembershipConfig");
//获取首页商品
const getGoods = () => {
  return request.post(requestUrl + "/api/index/mall/goods/");
};

//获取分类
const getCate = () => {
  return request.post(requestUrl + "/api/index/mall/cate");
};

// 获取分类下的某个分类 列表
const getCateList = (cate_id) => {
  return request.post(requestUrl + "/api/index/mall/list/", {
    cate_id,
  });
};

// 获取价格
const getPrice = (good_id) => {
  return request.post(requestUrl + "/api/index/mall/price/", {
    good_id,
  });
};

// 获取商品详情
const getGoodsDetail = (good_id) => {
  return request.post(requestUrl + "/api/index/mall/detail/", {
    good_id,
  });
};
module.exports = {
  getGoods,
  getCate,
  getCateList,
  getPrice,
  getGoodsDetail,
};
